﻿<UserControl
    x:Class="Windows_8_MVVM.Controls.LogoControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:behaviors="using:Ebt.Mvvm.Behaviors"
    mc:Ignorable="d"
    Width="350" Height="74">
    <UserControl.Resources>
        <Style x:Key="LandscapeLogoStyle" TargetType="Grid">
            <Setter Property="Height" Value="75"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="SnappedLogoStyle" TargetType="Grid">
            <Setter Property="Height" Value="55"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid Width="350"
          behaviors:OrientationBehavior.LandscapeStyle="{StaticResource LandscapeLogoStyle}"
          behaviors:OrientationBehavior.SnappedStyle="{StaticResource SnappedLogoStyle}">
        <TextBlock Width="350" Height="74">
            <Run Text="Title" FontSize="50"/>
        </TextBlock>
    </Grid>
</UserControl>